package com.zh.ssmshirofreemarker.entity;

import java.util.HashMap;
import  java.util.Map;

public class JsTree {

    private String id;
    private String parent;
    private String text;
    private Map<String,Object> state = new HashMap<>();
    //private String icon = "/static/img/menu.png";

    public JsTree() {
    }

    public JsTree(String id, String parent, String text) {
        this.id = id;
        this.parent = parent;
        this.text = text;
        if(id.equals("0")){
            state.put("opened",true);
        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Map<String, Object> getState() {
        return state;
    }

    public void setState(Map<String, Object> state) {
        this.state = state;
    }

//    public String getIcon() {
//        return icon;
//    }
//
//    public void setIcon(String icon) {
//        this.icon = icon;
//    }

    public String getParent() {
        return parent;
    }

    public void setParent(String parent) {
        this.parent = parent;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
